﻿using FunnyArts.PrettyClient.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace FunnyArts.PrettyClient.Services.Contracts
{
    public interface IWindow
    {
        event RoutedEventHandler Loaded;

        void Show();

        /// <summary>
        /// 插件加载线程
        /// </summary>
        public Task<List<PluginJSObject>> pluginLoadTask { get; set; }
        /// <summary>
        /// 接口加载线程
        /// </summary>
        public event Func<Task> interfaceLoadTask;

        /// <summary>
        /// 插件是否加载完毕
        /// </summary>
        /// <returns></returns>
        public bool IsPluginLoadCompleted()
        {
            return pluginLoadTask != null && pluginLoadTask.IsCompleted;
        }
        /// <summary>
        /// 接口是否加载完毕
        /// </summary>
        /// <returns></returns>
        //public bool IsInterfaceLoadCompleted()
        //{
        //    return interfaceLoadTask != null && interfaceLoadTask.IsCompleted;
        //}
    }
}
